#ifndef __SHOOTER_CLUTCH_H
#define __SHOOTER_CLUTCH_H

#include <stdint.h>

#include "main.h"

enum { SHOOTER_CLUTCH_UNLOCK=0, SHOOTER_CLUTCH_LOCK=1 };

typedef struct _shooter_clutch_t {
    void *port;
    uint16_t pin;
    uint8_t lock;
} shooter_clutch_t;

void shooter_clutch_init(shooter_clutch_t *clu, void *port, uint16_t pin);
void shooter_clutch_set_lock(shooter_clutch_t *clu);
void shooter_clutch_set_unlock(shooter_clutch_t *clu);
int shooter_clutch_is_locked(shooter_clutch_t *clu);

#endif /* !__SHOOTER_CLUTCH_H */